package com.java214.array.queue;

/**
 * @program: JavaData
 * @ClassName TestMyQueue
 * @description:
 * @author: tyf19970214
 * @create: 2021-05-07 00:45
 * @Version 1.0
 **/
public class TestMyCycleQueue {

    public static void main(String[] args) {
        MyCycleQueue mq=new MyCycleQueue(4);
        mq.insert(23);
        mq.insert(45);
        mq.insert(13);
        mq.insert(1);

        System.out.println(mq.isFull());
        System.out.println(mq.isEmpty());

        System.out.println(mq.see());
        while (!mq.isEmpty()){
            System.out.print(mq.delete()+"");//通过循环遍历之后，将数据取出
        }

        System.out.println(mq.isFull());
        System.out.println(mq.isEmpty());

        mq.insert(23);
        mq.insert(45);
        mq.insert(13);
        mq.insert(1);

        while (!mq.isEmpty()){
            System.out.print(mq.delete()+"");//通过循环遍历之后，将数据取出
        }
    }
}
